<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/2/21 0021
 * Time: 上午 10:35
 */
namespace app\behavior;
use think\Request;
use think\facade\Session;
class Test
{
    public function CheckAuth(Request $request,$params){
        $controller=$request->controller();
        if($controller!="Index"){
            if(!Session::get('userinfo.id')){
                echo  jumpinfo('您尚未登录,请先去登录！',url('Index/login'),2,2);
            }
        }
    }
}